package com.yuw.reflectiondemo;

public class Student {
    // 属性
    private String stuName;
    private int stuAge;
    private String strNum;
    private String stuSex;

    // 行为


    public Student(String stuName) {
        this.stuName = stuName;
    }

    public Student(String stuName, int stuAge, String strNum, String stuSex) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        this.strNum = strNum;
        this.stuSex = stuSex;
    }

    public Student() {
    }


    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public String getStrNum() {
        return strNum;
    }

    public void setStrNum(String strNum) {
        this.strNum = strNum;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }

    /**
     * 重载：学习行为
     */
    public void doStuding() {
        System.out.println(this.stuName + " is studing...");
    }

    /**
     * 重载：学习行为
     *
     * @param strAddress 学习场所
     */
    public void doStuding(String strAddress) {
        System.out.println(this.stuName + " is studing at " + strAddress);
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuName='" + stuName + '\'' +
                ", stuAge=" + stuAge +
                ", strNum='" + strNum + '\'' +
                ", stuSex='" + stuSex + '\'' +
                '}';
    }
}
